package com.github.chirspan.xaas.auth.integration;

/**
 * *******description*******
 * <p>
 * *************************
 *
 * @author ChenPan
 * @date 2019/3/29 09:06
 */
public class IntegrationAuthenticationContext {

    private static ThreadLocal<IntegrationAuthentication> holder = new ThreadLocal<>();

    public static void set(IntegrationAuthentication integrationAuthentication){
        holder.set(integrationAuthentication);
    }

    public static IntegrationAuthentication get(){
        return holder.get();
    }

    public static void clear(){
        holder.remove();
    }
}
